// 记录公共方法
#pragma once
// 记录错误码
enum ErrCode
{
    OK = 0,
    USAGE_ERR,
    SOCKET_ERR,
    BIND_ERR,
    LISTEN_ERR,
    CONNECT_ERR,
    WRITE_ERR,
    READ_ERR,
    FORK_EXIT
};

class nocopy
{
public:

    nocopy() = default;
    //拷贝和赋值全部屏蔽
    nocopy(const nocopy& no) = delete;
    nocopy& operator=(const nocopy& no) = delete;
};

#define ADDR_PTR(addr_in) ((sockaddr*)&addr_in)